<html>
<body background="../../money/pic/topbg.jpg"><?php
/**
 * Created by PhpStorm.
 * User: helloxingtongshi
 * Date: 2016-05-17
 * Time: 11:15
*/
   //接收数据
    $user = array(
        'userid' => empty($_POST['userid']) ? 0 : $_POST['userid'],
        'username' =>@$_POST['username'],
        'grant' => $_POST['grant'],
        'password' => $_POST['password'],
    ); /**/

    //包含数据库连接文件
    //使用require语句包含并执行sql.php
    require 'boss.inc.php';
    //检测用户名及密码是否正确
    $check_query = mysql_query("select `grant` from user where username='{$user['username']}' and passkey='{$user['password']}' limit 1");
    if($result = mysql_fetch_array(@$check_query)){
        echo $result['grant'],' 欢迎登录本系统！进入 <a href="navigation.php">用户中心</a><br />';
        exit;
    } else {
        exit('登录失败！点击此处 <a href="javascript:history.back(-1);">返回</a> 重试');
    }
?>


</body>
</html>
